import { CodecBase } from "./codec_type";

export function encodeAll(buf: number[], index: number, ...args: CodecBase[]) {
    for (let arg of args) {
        arg.encode(buf, index);
        index += arg.size();
    }
}

export function decodeAll(buf: number[], index: number, ...args: CodecBase[]) {
    for (let arg of args) {
        arg.decode(buf, index);
        index += arg.size();
    }
}



